package com.tao.springBootJedis.controller;


import com.tao.springBootJedis.pojo.User;
import com.tao.springBootJedis.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
public class UserController {
    @Autowired
    UserService userService;

    @GetMapping("/user")
    public List<User> selectAllUser(){
        log.info("执行了查询操作");
        return userService.selectAllUser();
    }
}
